#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<queue>
#include<vector>
using namespace  std;
void Find(vector<int>& v)
{
	priority_queue <int>pq;
	for (auto it : v)
		pq.push(it);
	for (auto it : v)
		cout << it << ' ';
	cout << endl;
	int k = 3;
	while (--k)
	{
		cout << pq.top() << ' ';
		pq.pop();
	}
	cout << endl;
	cout << pq.top();

}
int main()
{
	vector<int>v;
	v.push_back(6);
	v.push_back(0);
	v.push_back(4);
	v.push_back(1);
	v.push_back(-3);
	Find(v);
	return 0;
}
